<template>
  <div class="manger_one">
    <div class="manger_box">
      <yd-backtop></yd-backtop>
      <ul>
        <li v-for="(one,index) in lists" :key="index">
          <div class="box_image" v-if="one.img" :style="'backgroundImage:url('+one.img[0]+')'"></div>
          <div class="box_image" v-if="!one.img"></div>
          <div class="box_msg">
            <p>{{one.content}}</p>
          </div>
          <div class="box_time">
            <img src="../../assets/images/ic_tv_clock.png" alt="">
            <p>{{one.create_time*1000 | dateFmt('YYYY-MM-DD')}}</p>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>
<style lang="scss">
  .manger_one {
    width: 100%;
    padding-top: 44px;
    padding-bottom: 44px;
    background: #fff;
    .manger_box {
      .yd-backtop {
        right: 9%;
        bottom: 9%;
        border: 2px solid #42bd56;
      }
      .yd-backtop:after {
        color: #42bd56;
      }
      ul {
        width: 100%;
        li {
          width: 100%;
          border-bottom: 1px solid #f2f2f2;
          padding: 10px;
          display: inline-flex;
          align-items: center;
          justify-content: space-between;
          .box_image {
            width: 60px;
            height: 60px;
            background: url("../../assets/images/ic_male_header_icon.png") no-repeat;
            border: 1px solid #f2f2f2;
            background-size: 100% 100%;
          }
          .box_msg {
            margin-left: 10px;
            width: 50%;
            margin-right: 10px;
            height: 20px;
            text-overflow: ellipsis;
            overflow: hidden;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            p {
              font-size: 0.2rem;
            }
          }
          .box_time {
            text-align: center;
            img {
              width: 20px;
              display: inline-block;
            }
            p {
              font-size: 13px;
              line-height: 30px;
              color: #fbae45;
            }
          }
        }
      }
    }
  }
</style>
<script>
  import {getMangerOne} from "../../api/data";

  export default {
    data() {
      return {
        lists: [],
        page: 1,
        pageSize: 10
      }
    },
    created() {
      this._getMangerOne()
    },
    methods: {
      _getMangerOne() {
        getMangerOne().then(res => {
          // console.log(res)
          if (res.code === 200) {
            this.lists = res.data
            // console.log(this.lists)
          }
        })
      }
    },
    components: {}
  }
</script>
